var t, a = function(t) {
    return t && t.__esModule ? t : {
        default: t
    };
}(require("../../../utils/tools.js"));

getApp();

Page({
    data: {
        orderStatus: function(t, a, e) {
            return a in t ? Object.defineProperty(t, a, {
                value: e,
                enumerable: !0,
                configurable: !0,
                writable: !0
            }) : t[a] = e, t;
        }({
            1: "FA2828",
            2: "FF8E00",
            3: "26BCC5",
            4: "909090"
        }, "4", "8C9EAE")
    },
    onLoad: function(a) {
        t = this;
    },
    onReady: function() {},
    onShow: function() {
        var e = {
            action: "order",
            contr: "goods",
            token: wx.getStorageSync("token")
        };
        a.default.request(e, function(a) {
            t.setData(a.info);
        });
    },
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    gotoGoods: function() {
        wx.navigateTo({
            url: "/bh_farm/pages/goods/goods"
        });
    },
    navigateToDetial: function(t) {
        var a = t.currentTarget.dataset.value;
        wx.navigateTo({
            url: "/bh_farm/pages/goodsDetails/goodsDetails?id=" + a
        });
    },
    gotoDetail: function(t) {
        var a = t.currentTarget.dataset.id;
        wx.navigateTo({
            url: "/bh_farm/pages/detail/detail?id=" + a
        });
    },
    copy: function(t) {
        var a = t.currentTarget.dataset.value;
        wx.setClipboardData({
            data: a,
            success: function() {
                wx.showToast({
                    title: "复制成功",
                    mask: "none"
                });
            }
        });
    },
    addAddress: function() {
        wx.navigateTo({
            url: "/bh_farm/pages/address/address"
        });
    },
    onShareAppMessage: function() {
        return {
            title: this.data.share.text,
            imageUrl: this.data.share.images,
            path: "bh_farm/pages/index/index?parent_id=" + this.data.share.member_id
        };
    }
});